package com.tzu.ft.base;

import java.io.Serializable;

/**
 * socket发送对象
 */
public class SendParam implements Serializable {

	private static final long serialVersionUID = 1L;
	// 文件名
	private String fileName;
	// 文件长度
	private long fileLength;
	// 校验码
	private String checkCode;
	// 根文件夹名称
	private String rootDirName;
	// 文件夹存储路径
	private String dirPath;

	// 传输文件类型,0文件，1带路径的文件
	private int transFileType;

	public SendParam() {
	}

	public SendParam(String fileName, long fileLength) {
		this(fileName, null, null, fileLength);
	}

	public SendParam(String fileName, String dirPath, long fileLength) {
		this(fileName, null, dirPath, fileLength);
	}

	public SendParam(String fileName, String rootDirName, String dirPath, long fileLength) {
		this.fileName = fileName;
		this.fileLength = fileLength;
		this.rootDirName = rootDirName;
		this.dirPath = dirPath;
		if (null != dirPath && !"".equals(dirPath.trim())) {
			transFileType = 1;
		} else {
			transFileType = 0;
		}
	}

	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	public long getFileLength() {
		return fileLength;
	}

	public void setFileLength(long fileLength) {
		this.fileLength = fileLength;
	}

	public String getCheckCode() {
		return checkCode;
	}

	public void setCheckCode(String checkCode) {
		this.checkCode = checkCode;
	}

	public String getDirPath() {
		return dirPath;
	}

	public void setDirPath(String dirPath) {
		this.dirPath = dirPath;
	}

	public String getRootDirName() {
		return rootDirName;
	}

	public int getTransFileType() {
		return transFileType;
	}

	public void setTransFileType(int transFileType) {
		this.transFileType = transFileType;
	}

	public void setRootDirName(String rootDirName) {
		this.rootDirName = rootDirName;
	}
}
